#include"RBTree.h"
#include<vector>
void test1()
{
	int a[] = { 4,2,6,1,3,5,15,7,16,14 };
	RBTree<int, int> t;
	for (auto e : a)
	{
		t.Insert(make_pair(e, e));
		cout << "Insert:" << e << t.IsBalance() << endl;
	}
}

void TestMoreNum()
{
	const int N = 10000;
	vector<int> v;
	v.reserve(N);
	srand(time(0));
	for (size_t i = 0; i < N; i++)
	{
		v.push_back(rand());
	}
	RBTree<int, int> at;
	for (auto e : v)
	{
		at.Insert(make_pair(e, e));
		cout << "Insert:" << e << "->" << at.IsBalance() << endl;;
	}
}

int main()
{
	TestMoreNum();
	return 0;
}